% MergeSort-RecursionTree
% Manuel Kirsch
\documentclass[a4paper,landscape]{scrartcl}
%%%<
\usepackage{verbatim}
\usepackage[active,tightpage]{preview}
%\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}%
%%%>

\begin{comment}
:Title:  Merge sort recursion tree

\end{comment}
\usepackage{fancybox}
\usepackage{tikz}

\title{MergeSort-RecursionTree}
\author{Manuel Kirsch}
\date{}
\begin{document}
\begin{preview}

\tikzset{
    bold/.style={fill=blue!10, draw=red, line width=2pt},
    normal/.style={fill=blue!10, draw=black, line width=0.5pt},
    dotted/.style={draw=black, line width=0.5pt, dashed, thin}
}


\begin{tikzpicture}[level/.style={sibling distance=40mm/#1}]
\node [circle,normal, bold] (z){$x_1$}
    child {
        node [circle,draw,normal] (a) {$x_2$}
            child {
                node {$\vdots$}
                edge from parent [normal]
                node[left] {$ 0 $}
            }
            child {
                node {$\vdots$}
                edge from parent [normal]
                node[right] {$ 1 $}
            }
        edge from parent [normal]
        node[left] {$ 0 $}
  }
  child {node [circle,draw,bold] (j) {$x_2$}
        child {
	    node [circle,draw, bold] {$x_3$}
            child {
            	    node [circle,draw, dotted] {$x_4$}
                    edge from parent [dotted]
            }            
            child {
            	    node [circle,draw, dotted] {$x_5$}
                    edge from parent [dotted]
            }            
            child {
            	    node [circle,draw, dotted] {$x_6$}
                    edge from parent [dotted]
            }
            child {
            	    node [circle,draw, dotted] {$x_7$}
                    edge from parent [dotted]
            }            
            child {
            	    node [circle,draw, dotted] {$x_8$}
                    edge from parent [dotted]
            }            
            child {
            	    node [circle,draw, dotted] {$x_9$}
                    edge from parent [dotted]
            }            
            edge from parent [bold]
            node[left] {$ 0 $}
        }
        child {
            node {$\vdots$}
            edge from parent [normal]
            node[right] {$ 1 $}
        }
        edge from parent [bold]
        node[right] {$ 1 $}
  };

\end{tikzpicture}
\end{preview}
\end{document}
